<!-- 即将进入公海线索 -->
<template>
  <div class="clue-pool-remind-container">
    <!-- 搜索工作栏 -->
    <ContentWrap class="search-wrapper">
      <div class="search-form-container">
        <el-form
          ref="queryFormRef"
          :inline="true"
          :model="queryParams"
          label-position="left"
          class="enhanced-search-form"
        >
          <div class="form-row">
            <el-form-item label="归属" prop="sceneType" class="form-item">
              <el-select
                v-model="queryParams.sceneType"
                placeholder="归属"
                @change="handleQuery"
                class="enhanced-select"
              >
                <template #prefix>
                  <Icon icon="ep:user" />
                </template>
                <el-option
                  v-for="(option, index) in SCENE_TYPES"
                  :label="option.label"
                  :value="option.value"
                  :key="index"
                >
                  <div class="option-item">
                    <Icon icon="ep:user-filled" class="option-icon" />
                    <span>{{ option.label }}</span>
                  </div>
                </el-option>
              </el-select>
            </el-form-item>
          </div>

          <div class="module-section">
            <el-form-item label="所属模块" class="module-form-item">
              <div class="module-buttons">
                <el-badge
                  v-for="item in moduleSimpleList"
                  :value="item.count > 0 ? item.count : ''"
                  :class="['module-badge']"
                  :key="item.id"
                >
                  <el-button
                    :class="{ 'active-module': queryParams.moduleId == item.id }"
                    @click="handleGetModuleList(item.id)"
                    class="module-button"
                  >
                    <Icon icon="ep:folder" class="module-icon" />
                    {{ item.name }}
                  </el-button>
                </el-badge>
              </div>
            </el-form-item>
          </div>
        </el-form>
      </div>
    </ContentWrap>

    <!-- 列表区域 -->
    <ContentWrap class="table-wrapper">
      <div class="table-header">
        <div class="header-icon">
          <Icon icon="ep:list" />
        </div>
        <div class="header-content">
          <h4 class="table-title">线索列表</h4>
          <p class="table-subtitle">共 {{ total }} 个线索</p>
        </div>
      </div>

      <div class="table-container">
        <el-table
          v-loading="loading"
          :data="list"
          :stripe="true"
          :show-overflow-tooltip="true"
          class="enhanced-table"
          :header-cell-style="{ background: '#f8f9ff', color: '#303133', fontWeight: '600' }"
        >
          <el-table-column label="线索名称" align="center" prop="name" fixed="left" width="160">
            <template #default="scope">
              <div class="name-cell">
                <Icon icon="ep:opportunity" class="cell-icon" />
                <el-link
                  :underline="false"
                  type="primary"
                  @click="openDetail(scope.row.id)"
                  class="clue-link"
                >
                  {{ scope.row.name }}
                </el-link>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="线索来源" align="center" prop="source" width="120">
            <template #default="scope">
              <div class="source-cell">
                <Icon icon="ep:position" class="cell-icon" />
                <dict-tag
                  :type="DICT_TYPE.CRM_CUSTOMER_SOURCE"
                  :value="scope.row.source"
                  class="enhanced-tag"
                />
              </div>
            </template>
          </el-table-column>

          <el-table-column label="手机" align="center" prop="encryptMobile" width="120">
            <template #default="scope">
              <div class="contact-cell">
                <Icon icon="ep:iphone" class="cell-icon" />
                <span class="contact-text">{{ scope.row.encryptMobile }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="电话" align="center" prop="encryptTelephone" width="130">
            <template #default="scope">
              <div class="contact-cell">
                <Icon icon="ep:phone" class="cell-icon" />
                <span class="contact-text">{{ scope.row.encryptTelephone }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="微信" align="center" prop="wechat" width="130">
            <template #default="scope">
              <div class="contact-cell">
                <Icon icon="ep:chat-dot-round" class="cell-icon" />
                <span class="contact-text">{{ scope.row.wechat }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="QQ" align="center" prop="qq" width="130">
            <template #default="scope">
              <div class="contact-cell">
                <Icon icon="ep:chat-line-round" class="cell-icon" />
                <span class="contact-text">{{ scope.row.qq }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="邮箱" align="center" prop="email" width="180">
            <template #default="scope">
              <div class="contact-cell">
                <Icon icon="ep:message" class="cell-icon" />
                <span class="contact-text">{{ scope.row.email }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column label="地址" align="center" prop="detailAddress" width="180">
            <template #default="scope">
              <div class="address-cell">
                <Icon icon="ep:location" class="cell-icon" />
                <span class="address-text">{{ scope.row.detailAddress }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="客户行业" prop="industryId" width="120">
            <template #default="scope">
              <div class="industry-cell">
                <Icon icon="ep:office-building" class="cell-icon" />
                <dict-tag
                  :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY"
                  :value="scope.row.industryId"
                  class="enhanced-tag"
                />
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="客户级别" prop="level" width="135">
            <template #default="scope">
              <div class="level-cell">
                <Icon icon="ep:star" class="cell-icon" />
                <dict-tag
                  :type="DICT_TYPE.CRM_CUSTOMER_LEVEL"
                  :value="scope.row.level"
                  class="enhanced-tag"
                />
              </div>
            </template>
          </el-table-column>

          <el-table-column
            :formatter="dateFormatter"
            align="center"
            label="下次联系时间"
            prop="contactNextTime"
            width="180px"
          >
            <template #default="scope">
              <div class="time-cell">
                <Icon icon="ep:clock" class="cell-icon" />
                <span class="time-text">{{
                  dateFormatter(scope.row, null, scope.row.contactNextTime)
                }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="备注" prop="remark" width="200">
            <template #default="scope">
              <div class="remark-cell">
                <Icon icon="ep:document" class="cell-icon" />
                <span class="remark-text">{{ scope.row.remark }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            label="最后跟进时间"
            align="center"
            prop="contactLastTime"
            :formatter="dateFormatter"
            width="180px"
          >
            <template #default="scope">
              <div class="time-cell">
                <Icon icon="ep:clock" class="cell-icon" />
                <span class="time-text">{{
                  dateFormatter(scope.row, null, scope.row.contactLastTime)
                }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            align="center"
            label="最后跟进记录"
            prop="contactLastContent"
            width="200"
          >
            <template #default="scope">
              <div class="content-cell">
                <Icon icon="ep:edit" class="cell-icon" />
                <span class="content-text">{{ scope.row.contactLastContent }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="负责人" prop="ownerUserName" width="100px">
            <template #default="scope">
              <div class="owner-cell">
                <Icon icon="ep:user-filled" class="cell-icon" />
                <span class="owner-text">{{ scope.row.ownerUserName }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="120">
            <template #default="scope">
              <div class="dept-cell">
                <Icon icon="ep:office-building" class="cell-icon" />
                <span class="dept-text">{{ scope.row.ownerUserDeptName }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            label="更新时间"
            align="center"
            prop="updateTime"
            :formatter="dateFormatter"
            width="180px"
          >
            <template #default="scope">
              <div class="time-cell">
                <Icon icon="ep:clock" class="cell-icon" />
                <span class="time-text">{{
                  dateFormatter(scope.row, null, scope.row.updateTime)
                }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            label="创建时间"
            align="center"
            prop="createTime"
            :formatter="dateFormatter"
            width="180px"
          >
            <template #default="scope">
              <div class="time-cell">
                <Icon icon="ep:clock" class="cell-icon" />
                <span class="time-text">{{
                  dateFormatter(scope.row, null, scope.row.createTime)
                }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column align="center" label="创建人" prop="creatorName" width="100px">
            <template #default="scope">
              <div class="creator-cell">
                <Icon icon="ep:user" class="cell-icon" />
                <span class="creator-text">{{ scope.row.creatorName }}</span>
              </div>
            </template>
          </el-table-column>
        </el-table>

        <!-- 分页 -->
        <div class="pagination-wrapper">
          <Pagination
            v-model:limit="queryParams.pageSize"
            v-model:page="queryParams.pageNo"
            :total="total"
            @pagination="getList"
          />
        </div>
      </div>
    </ContentWrap>

    <!-- 详情弹窗 -->
    <CrmSpec ref="crmSpec" @getPage="handleQuery" />
  </div>
</template>

<script lang="ts" setup>
import * as ClueApi from '@/api/crm/clue'
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import { SCENE_TYPES } from './common'
import { getModuleList } from '@/api/crm/module/index'

defineOptions({ name: 'CrmCustomerPutPoolRemindList' })

const props = defineProps({
  moduleCountObj: {
    type: Object,
    default: () => {}
  }
})
const moduleSimpleList = ref([])
const getModuleSimpleList = async () => {
  moduleSimpleList.value = await getModuleList()
}

watch(
  () => props.moduleCountObj,
  async (newVal) => {
    await getModuleSimpleList()
    for (const obj of moduleSimpleList.value) {
      for (let key in newVal) {
        if (obj.id == key) {
          obj.count = newVal[key]
        }
      }
    }
    if (moduleSimpleList.value.find((i) => i.count && i.count > 0) != undefined) {
      queryParams.value.moduleId = moduleSimpleList.value.find((i) => i.count && i.count > 0).id
    } else {
      queryParams.value.moduleId = moduleSimpleList.value[0]?.id
    }
    getList()
  },
  {
    immediate: true
  }
)

const handleGetModuleList = async (id) => {
  queryParams.value.moduleId = id
  await getList()
}

const CrmcustomerProgressMap = {
  0: '待跟进',
  1: '已跟进',
  2: '创建商机',
  3: '创建合同',
  4: '合同回款',
  '-1': '输单',
  9: '赢单'
}
const crmSpec = ref(null)
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
const list = ref([]) // 列表的数据
const queryParams = ref({
  pageNo: 1,
  pageSize: 10,
  sceneType: 1, // 我负责的
  moduleId: undefined
})
const queryFormRef = ref() // 搜索的表单

/** 查询列表 */
const getList = async () => {
  loading.value = true
  try {
    const data = await ClueApi.getCluePutPoolRemindPage(queryParams.value)
    list.value = data.list
    total.value = data.total
  } finally {
    loading.value = false
  }
}

/** 搜索按钮操作 */
const handleQuery = () => {
  queryParams.value.pageNo = 1
  getList()
}

/** 打开客户详情 */
const { push } = useRouter()
const openDetail = (id: number) => {
  const arrId = list.value.map((item) => item.id)
  crmSpec.value.setDrawer(true, 'customer', id, arrId)
}
/** 激活时 */
onActivated(async () => {
  await getList()
})
</script>

<style lang="scss" scoped>
// 主题色变量
$primary-color: #0052cc;
$primary-light: rgba(0, 82, 204, 0.1);
$primary-border: rgba(0, 82, 204, 0.3);
$success-color: #67c23a;
$warning-color: #e6a23c;
$danger-color: #f56c6c;
$info-color: #909399;
$text-primary: #303133;
$text-regular: #606266;
$text-secondary: #909399;
$text-placeholder: #c0c4cc;
$border-color: #dcdfe6;
$border-light: #e4e7ed;
$bg-color: #f5f7fa;
$shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
$shadow-base:
  0 2px 4px rgba(0, 0, 0, 0.12),
  0 0 6px rgba(0, 0, 0, 0.04);
$border-radius: 12px;
$border-radius-small: 8px;

.clue-pool-remind-container {
  padding: 0;
  background: $bg-color;

  @media (max-width: 768px) {
    padding: 0;
  }
}

/* 搜索区域样式 */
.search-wrapper {
  margin-bottom: 16px;
  border-radius: $border-radius;
  overflow: hidden;
  box-shadow: $shadow-light;
  border: 1px solid $border-light;

  :deep(.el-card__body) {
    padding: 0;
  }
}

.search-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, $warning-color 0%, #faad14 100%);
  color: white;

  @media (max-width: 768px) {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

.header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: $border-radius-small;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;

  @media (max-width: 768px) {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

.header-content {
  flex: 1;
  margin-left: 12px;

  @media (max-width: 768px) {
    margin-left: 0;
  }
}

.search-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;

  @media (max-width: 768px) {
    font-size: 16px;
  }
}

.search-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;

  @media (max-width: 768px) {
    font-size: 12px;
  }
}

.search-form-container {
  padding: 24px;
  background: white;

  @media (max-width: 768px) {
    padding: 16px;
  }
}

.enhanced-search-form {
  .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;

    @media (max-width: 768px) {
      flex-direction: column;
      gap: 12px;
      margin-bottom: 16px;
    }
  }

  .form-item {
    flex: 1;
    min-width: 260px;
    margin-bottom: 0;

    @media (max-width: 768px) {
      min-width: auto;
      flex: none;
    }

    :deep(.el-form-item__label) {
      font-weight: 600;
      color: $text-regular;
      padding-bottom: 8px;

      @media (max-width: 768px) {
        font-size: 14px;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 8px;
      }
    }

    :deep(.el-form-item__content) {
      @media (max-width: 768px) {
        margin-left: 0 !important;
      }
    }
  }

  // H5适配：表单项垂直布局
  @media (max-width: 768px) {
    :deep(.el-form-item) {
      display: block;
    }
  }
}

/* 模块选择区域 */
.module-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid $border-light;

  @media (max-width: 768px) {
    margin-top: 12px;
    padding-top: 12px;
  }
}

.module-form-item {
  margin-bottom: 0;

  :deep(.el-form-item__label) {
    font-weight: 600;
    color: $text-regular;
    padding-bottom: 8px;

    @media (max-width: 768px) {
      font-size: 14px;
      width: 100% !important;
      text-align: left !important;
      margin-bottom: 8px;
    }
  }

  :deep(.el-form-item__content) {
    @media (max-width: 768px) {
      margin-left: 0 !important;
    }
  }
}

.module-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  @media (max-width: 768px) {
    flex-direction: column;
    gap: 8px;
  }
}

.module-badge {
  :deep(.el-badge__content) {
    background: $danger-color;
    border: 1px solid $danger-color;
    font-size: 10px;
    height: 16px;
    line-height: 16px;
    min-width: 16px;
    padding: 0 4px;
  }
}

.module-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: $border-radius-small;
  border: 2px solid $border-color;
  background: white;
  color: $text-regular;
  font-weight: 500;
  transition: all 0.3s ease;

  &:hover {
    border-color: $primary-color;
    color: $primary-color;
    background: $primary-light;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
  }

  &.active-module {
    border-color: $primary-color;
    color: $primary-color;
    background: $primary-light;
    box-shadow: 0 2px 8px rgba(0, 82, 204, 0.2);
  }

  @media (max-width: 768px) {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  .module-icon {
    font-size: 14px;
  }
}

/* 选择器样式 */
.enhanced-select {
  width: 100%;

  :deep(.el-select__wrapper) {
    border-radius: $border-radius-small;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    padding: 8px 16px;

    &:hover {
      box-shadow: 0 4px 12px rgba(0, 82, 204, 0.1);
    }

    &.is-focused {
      box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
      border-color: $primary-color;
    }
  }
}

/* 选项样式 */
.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.option-icon {
  font-size: 14px;
  color: $primary-color;
}

/* 表格区域样式 */
.table-wrapper {
  border-radius: $border-radius;
  overflow: hidden;
  box-shadow: $shadow-light;
  border: 1px solid $border-light;

  :deep(.el-card__body) {
    padding: 0;
  }
}

.table-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, $primary-color 0%, #1d4ed8 100%);
  color: white;

  @media (max-width: 768px) {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

.table-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;

  @media (max-width: 768px) {
    font-size: 16px;
  }
}

.table-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;

  @media (max-width: 768px) {
    font-size: 12px;
  }
}

.table-container {
  background: white;
  overflow-x: auto;
}

.enhanced-table {
  :deep(.el-table__header) {
    th {
      background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%) !important;
      color: $text-primary !important;
      font-weight: 600 !important;
      border-bottom: 2px solid $primary-light;
      padding: 16px 12px;
    }
  }

  :deep(.el-table__body) {
    tr {
      transition: all 0.3s ease;

      &:hover {
        background: $primary-light !important;
      }

      td {
        padding: 14px 12px;
        border-bottom: 1px solid $border-light;
      }
    }

    .el-table__row--striped {
      background: #fafbff;

      &:hover {
        background: $primary-light !important;
      }
    }
  }

  // H5适配
  @media (max-width: 768px) {
    :deep(.el-table__header) th {
      padding: 12px 8px;
      font-size: 13px;
    }

    :deep(.el-table__body) td {
      padding: 12px 8px;
      font-size: 12px;
    }
  }
}

/* 表格单元格样式 */
.name-cell,
.source-cell,
.contact-cell,
.address-cell,
.industry-cell,
.level-cell,
.time-cell,
.remark-cell,
.content-cell,
.owner-cell,
.dept-cell,
.creator-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.cell-icon {
  font-size: 14px;
  flex-shrink: 0;
  color: $primary-color;
}

.clue-link {
  color: $primary-color;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;

  &:hover {
    color: #1d4ed8;
    text-shadow: 0 1px 3px rgba(0, 82, 204, 0.3);
  }

  @media (max-width: 768px) {
    font-size: 12px;
  }
}

.contact-text {
  color: $text-regular;
  font-weight: 500;
  font-family: 'Courier New', monospace;
  background: rgba(144, 147, 153, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;

  @media (max-width: 768px) {
    font-size: 11px;
    padding: 1px 4px;
  }
}

.address-text {
  color: $text-regular;
  font-size: 12px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  @media (max-width: 768px) {
    max-width: 100px;
    font-size: 11px;
  }
}

.time-text {
  color: $info-color;
  font-weight: 500;
  font-family: 'Courier New', monospace;
  background: rgba(144, 147, 153, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;

  @media (max-width: 768px) {
    font-size: 11px;
    padding: 1px 4px;
  }
}

.remark-text,
.content-text {
  color: $text-secondary;
  font-size: 12px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  @media (max-width: 768px) {
    max-width: 100px;
    font-size: 11px;
  }
}

.owner-text,
.dept-text,
.creator-text {
  color: $text-regular;
  font-weight: 500;
  font-size: 12px;

  @media (max-width: 768px) {
    font-size: 11px;
  }
}

/* 标签样式 */
.enhanced-tag {
  border-radius: 6px;
  font-weight: 500;
  padding: 4px 8px;
  font-size: 12px;
  border: none;
  box-shadow: $shadow-base;

  @media (max-width: 768px) {
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* 分页样式 */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 24px;
  background: white;
  border-top: 1px solid $border-light;

  @media (max-width: 768px) {
    padding: 16px 20px;
  }

  :deep(.el-pagination) {
    .el-pager li {
      border-radius: 6px;
      margin: 0 2px;
      transition: all 0.3s ease;

      &:hover {
        background: $primary-light;
        color: $primary-color;
      }

      &.is-active {
        background: $primary-color;
        color: white;
      }
    }

    .btn-prev,
    .btn-next {
      border-radius: 6px;
      transition: all 0.3s ease;

      &:hover {
        background: $primary-light;
        color: $primary-color;
      }
    }

    @media (max-width: 768px) {
      .el-pagination__sizes,
      .el-pagination__jump {
        display: none;
      }
    }
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .clue-pool-remind-container {
    background: #1f2937;
  }

  .search-wrapper,
  .table-wrapper {
    background: #374151;
    border-color: #4b5563;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .search-form-container,
  .table-container,
  .pagination-wrapper {
    background: #374151;
  }

  .search-title,
  .table-title {
    color: #f9fafb;
  }

  .module-section {
    border-color: #4b5563;
  }

  .module-button {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;

    &:hover,
    &.active-module {
      border-color: #60a5fa;
      color: #60a5fa;
      background: rgba(96, 165, 250, 0.1);
    }
  }

  .clue-link {
    color: #60a5fa;

    &:hover {
      color: #93c5fd;
    }
  }

  .contact-text,
  .time-text {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
  }

  .address-text,
  .owner-text,
  .dept-text,
  .creator-text {
    color: #f9fafb;
  }

  .remark-text,
  .content-text {
    color: #d1d5db;
  }

  .enhanced-table {
    :deep(.el-table__header) {
      th {
        background: #4b5563 !important;
        color: #f9fafb !important;
        border-bottom-color: #6b7280;
      }
    }

    :deep(.el-table__cell) {
      border-bottom-color: #4b5563;
    }
  }

  .enhanced-select {
    :deep(.el-select__wrapper) {
      background: #4b5563;
      border-color: #6b7280;

      .el-select__placeholder {
        color: #9ca3af;
      }
    }
  }
}

/* 响应式优化 */
@media (max-width: 480px) {
  .search-header,
  .table-header {
    padding: 12px 16px;
  }

  .search-form-container {
    padding: 12px;
  }

  .pagination-wrapper {
    padding: 12px 16px;
  }

  .enhanced-table {
    :deep(.el-table__header) th {
      padding: 10px 6px;
      font-size: 12px;
    }

    :deep(.el-table__body) td {
      padding: 10px 6px;
      font-size: 11px;
    }
  }

  .clue-link {
    font-size: 11px;
  }

  .contact-text,
  .time-text {
    font-size: 10px;
  }

  .address-text,
  .remark-text,
  .content-text {
    max-width: 80px;
    font-size: 10px;
  }

  .owner-text,
  .dept-text,
  .creator-text {
    font-size: 10px;
  }

  .enhanced-tag {
    font-size: 10px;
    padding: 2px 4px;
  }

  .module-button {
    padding: 8px 12px;
    font-size: 12px;
  }
}
</style>
